<%@ page import="com.graduation.lastproject.entity.User" %><%--
  Created by IntelliJ IDEA.
  User: cyy
  Date: 2020/3/18
  Time: 12:18
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
    String user=request.getSession().getAttribute("user")+"";
    String userPhone=request.getSession().getAttribute("userInfo")!=null ? ((User)request.getSession().getAttribute("userInfo")).getPhone() : "";
%>
<c:set var="ctx" value="<%=basePath%>"  />
<c:set var="user" value="<%=user%>"  />
<c:set var="userPhone" value="<%=userPhone%>"/>
<html>
<head>
    <link href="/static/bootstrap/css/bootstrap.min.css" rel="stylesheet">
    <link href="/static/bootstrap/css/bootstrapValidator.min.css"  rel="stylesheet"/>
    <link rel="stylesheet" href="/static/toastr/toastr.min.css">

    <script src="/static/js/jquery.min.js"></script>
    <script src="/static/bootstrap/js/bootstrap.min.js"></script>
    <script  src="/static/bootstrap/js/bootstrapValidator.js"></script>
    <script src="/static/toastr/toastr.min.js"></script>
    <script src="/static/js/bookHotel/hotelPay/hotelPay.js" ></script>
    <meta charset="UTF-8">
    <title></title>
    <style type="text/css">
        /*顶部*/
        .payTop{
            border-top: 4px solid #a51863
        }
        /*顶部、中部都要设置*/
        .topDetails,.payCenter{
            margin:10px  10%  0px 10%;

        }
        /*中部*/
        .payCenter{
            border: solid  #e4dfdc 1px;
        }

        /*中部两部分内容*/
        .bookRoom,.bookInfo,.padBottom{
            margin-left: 30px;
            color:black;
            font-weight: 400;
        }
        .bookbottom{
            border-bottom:dashed #e4dfdc 1px ;
            margin: 20px 0 20px 0;
            font-weight: 600;
            color:#651c4d;
        }
        .form-horizontal .control-label{
           text-align: left;
       }
        .form-control{
            border: 1px solid #eeeae9;
        }
        .col-md-1{
            padding-right: 0;
        }
        img{
            width: 250px;
            height: 90px;
        }
    </style>
    <script>
        var user='${user}';
        var trade_out='${trade_out}';
        var pri='${hotelPri}';
        var hotelNameRoom='${hotelNameRoom}';
        var ctx='${ctx}';
        var phone='${userPhone}';
        var uservipScore='${uservipScore}';
        var hotelId='${hotelId}';
        console.info("当前登录人:"+user+''+"登录人电话:"+phone);
    </script>
</head>
<body>
<div class="all">
    <!--顶部内容-->
    <div class="payTop" id="top">
        <div class="topDetails">
            <img  src="/static/img/logoNew.png">
            <c:choose>
                <c:when test="${user == 'null'}">
                    <button class="btn btn-primary pull-right" id="register">注册</button>
                    <button class="btn btn-danger pull-right" style="margin-right: 15px;" data-toggle="modal" data-target="#myModal">登录</button>
                </c:when>
                <c:otherwise>
                    <span class="btn btn-primary pull-right">用户名:${user}</span>
                </c:otherwise>
            </c:choose>
            <button class="btn btn-primary pull-right" style="margin-right:15px " id="returnPre">返回上一级</button>
            <button type="button" id="returnHome" class="btn btn-primary pull-right" style="margin-right:15px ">返回酒店列表</button>
        </div>
    </div>
    <!--主题内容-->
    <form  id="pay" action="${ctx}pay" method="post" class="form-horizontal center-block">
        <input type="hidden" name="WIDout_trade_no" value="${trade_out}">
        <input type="hidden" name="WIDsubject" value="${hotelNameRoom}">
        <input type="hidden" name="WIDtotal_amount"   id="hotelPri">      <%-- 付款金额  value="${hotelPri}" --%>
        <input type="hidden" name="hotelId" value="${hotelId}">
        <input type="hidden" name="hotelRoom" value="${hotelRoom}">
        <input type="hidden" name="userPhone" value="${userPhone}">
      <%--
        <input type="hidden" name="uservipScore" value="${uservipScore}">
        <input type="hidden" name="userIntegral" value="${userIntegral}">--%>
        <div class="payCenter">
            <div class="bookRoom">
                <h4 class="bookbottom" id="login">预订信息&nbsp;&nbsp;已是会员？立即<a href="" data-toggle="modal" data-target="#myModal">登录</a></h4>
                <form class="form-horizontal center-block" role="form" id="info">
                    <div class="form-group ">
                        <label  class="col-md-1 control-label">酒店信息:</label>
                        <div class="col-md-5">
                            <p class="form-control"> ${hotelNameRoom}</p>
                        </div>
                    </div>
                    <div class="form-group ">
                        <label  class="col-md-1 control-label">入住时间:</label>
                        <div class="col-md-2">
                            <p class="form-control"> ${inTime}</p>
                        </div>
                        <label  class="col-md-1 control-label">离开时间:</label>
                        <div class="col-md-2">
                            <p class="form-control"> ${outTime}</p>
                        </div>
                    </div>
                    <div class="form-group ">
                        <label  class="col-md-1 control-label">房间数量:</label>
                        <div class="col-md-5">
                            <p class="form-control"> 1 &nbsp;&nbsp; 间</p>
                        </div>
                    </div>
                </form>
            </div>
            <div class="bookInfo">
                <h4 class="bookbottom">入驻信息</h4>
                    <div class="form-group ">
                        <label  class="col-md-1 control-label">姓名:</label>
                        <div class="col-md-2">
                            <input class="form-control" id="" name="realname"  type="text" placeholder="请填写姓名"  autocomplete="off"/>
                        </div>
                    </div>
                    <div class="form-group ">
                        <label  class="col-md-1 control-label">电话:</label>
                        <div class="col-md-2">
                            <input class="form-control" id="" name="phone"  type="text" placeholder="请填写电话" autocomplete="off"/>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-md-1 control-label" style="padding-top: 0px">规则:</label>
                        <div class="col-md-2">
                            <input  id="mustRadio" name="mustRadio"  type="radio"><span style="font-size:12px;color:#bfbfbf;margin-top: 20px">预订当晚六点后不可退订</span>
                        </div>
                    </div>
            </div>
            <%--订单底部--%>
            <div class="padBottom">
                <h4 class="bookbottom">订单信息</h4>
                <div style="border-bottom: 1px dashed #e4dfdc">
                    <span style="color: #f60;font-size: 20px;">订单总价:RMB &nbsp; ${hotelPri}</span>
                    <span style="color: #337ab7;font-size: 20px; margin-left: 20px" id="vipPrice"></span></div>
                <%--button id="btn-test" type="button" class="btn-primary btn" style="width:150px; margin-left: 40%;">提交订单</button>--%>
                <button id="btn-test" type="submit" class="btn-primary btn" style="width:150px; margin-left: 40%;">提交订单</button>
            </div>
        </div>
    </form>

    <!-- 模态框 -->
    <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
        <div class="modal-dialog" role="document">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                    <h4 class="modal-title" id="myModalLabel">登录信息</h4>
                </div>
                <div class="modal-body" id="active">
                    <form class="form-horizontal">
                        <div class="form-group">
                            <label  class="col-md-1 control-label">姓名:</label>
                            <div class="col-md-8">
                                <input type="text"  id="loginName" placeholder="请输入注册手机号" class="form-control"  autocomplete="off">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-md-1 control-label">密码:</label>
                            <div class="col-md-8">
                                <input type="password"  id="loginPassword" placeholder="请输入密码" class="form-control"  autocomplete="off">
                            </div>
                        </div>
                    </form>
                        <%--姓名:<input type="text"       id="loginName"     placeholder="请输入注册手机号" class="form-control"  autocomplete="off">
                        密码:<input type="password"  id="loginPassword" placeholder="请输入密码" class="form-control"  autocomplete="off">--%>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
                    <button type="button" class="btn btn-primary" id="saveActive">登录</button>
                </div>
            </div>
        </div>
    </div>
</div>
</body>
</html>
